package com.bw.home.api

import com.bw.home.entity.CommentEntity
import com.bw.lib_net.BaseRes
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface CommentApi {

    //查询评论
    @GET("/comment/getCommentByUserId")
    suspend fun getComment(
        @Query("datatype") type: Int,
        @Query("itemid") id: String
    ): BaseRes<List<CommentEntity>>

    //发送评论
    @POST("/comment/publishComment")
    suspend fun publishComment(@Body entity: CommentEntity): BaseRes<CommentEntity>
}